// 房屋隐患管理
import type { AppRouteModule } from '/@/router/types';

import { LAYOUT } from '/@/router/constant';
import { t } from '/@/hooks/web/useI18n';

const charts: AppRouteModule = {
  path: '/jbxxHouse',
  name: 'jbxxHouse',
  component: LAYOUT,
  redirect: '/jbxxHouse/basicHouse',
  meta: {
    orderNo: 201,
    icon: 'ion:bar-chart-outline',
    title: t('routes.demo.basicHouse.root'),
    roles: ['Admin', 'City', 'Area', 'Street', 'Community', 'Investigator'],
    userGroups: ['FireControl'],
    hideChildrenInMenu: true,
  },
  children: [
    {
      path: 'basicHouse',
      name: 'basicHouse',
      meta: {
        title: t('routes.demo.basicHouse.root'),
        hideChildrenInMenu: true,
        roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
        userGroups: ['Admin', 'FireControl'],
      },
      component: () => import('/@/views/basicHouseList/index.vue'),
      children: [
        {
          path: 'townHourseList',
          name: 'townHourseList',
          meta: {
            hideMenu: true,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '房屋基本信息情况（乡镇）',
          },
          component: () => import('/@/views/basicHouseList/component/townBaseHourse.vue'),
        },
        {
          path: 'villageHourseList',
          name: 'villageHourseList',
          meta: {
            hideMenu: false,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '房屋基本信息情况（村级）',
          },
          component: () => import('/@/views/basicHouseList/component/villagebaseHourse.vue'),
        },
        {
          path: 'buildinglist',
          name: 'buildinglist',
          meta: {
            hideMenu: false,
            roles: ['Admin', 'City', 'Area', 'Street', 'Community'],
            userGroups: ['Admin', 'FireControl'],
            title: '房屋台账',
          },
          component: () => import('/@/views/basicHouseList/component/hourselist.vue'),
        },
      ],
    },
  ],
};

export default charts;
